package com.sjgs.gis.service.dto;

import io.swagger.annotations.ApiModel;
import javax.validation.constraints.*;
import java.io.Serializable;
import com.sjgs.gis.domain.enumeration.PluginType;

/**
 * A DTO for the {@link com.sjgs.gis.domain.Plugin} entity.
 */
@ApiModel(description = "Plugin entity for offline.\n@author The JHipster team.")
public class PluginDTO implements Serializable {
    
    private Long id;

    @NotNull
    private String name;

    @NotNull
    private String version;

    @NotNull
    private PluginType type;

    @NotNull
    private String srcUrl;

    private String fkey;

    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public PluginType getType() {
        return type;
    }

    public void setType(PluginType type) {
        this.type = type;
    }

    public String getSrcUrl() {
        return srcUrl;
    }

    public void setSrcUrl(String srcUrl) {
        this.srcUrl = srcUrl;
    }

    public String getFkey() {
        return fkey;
    }

    public void setFkey(String fkey) {
        this.fkey = fkey;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof PluginDTO)) {
            return false;
        }

        return id != null && id.equals(((PluginDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "PluginDTO{" +
            "id=" + getId() +
            ", name='" + getName() + "'" +
            ", version='" + getVersion() + "'" +
            ", type='" + getType() + "'" +
            ", srcUrl='" + getSrcUrl() + "'" +
            ", fkey='" + getFkey() + "'" +
            "}";
    }
}
